<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::BOWKMeansTrainer Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html">BOWKMeansTrainer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="../../d8/d32/classcv_1_1BOWKMeansTrainer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::BOWKMeansTrainer Class Reference<div class="ingroups"><a class="el" href="../../da/d9b/group__features2d.html">2D Features Framework</a> » <a class="el" href="../../de/d24/group__features2d__category.html">Object Categorization</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>kmeans -based class to train visual vocabulary using the <em>bag of visual words</em> approach. :  
 <a href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#details">More...</a></p>
<p><code>#include &lt;opencv2/features2d.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::BOWKMeansTrainer:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../d4/d72/classcv_1_1BOWKMeansTrainer.png" usemap="#cv::BOWKMeansTrainer_map"/>
  <map id="cv::BOWKMeansTrainer_map" name="cv::BOWKMeansTrainer_map">
<area alt="cv::BOWTrainer" coords="0,0,148,24" href="../../d5/d14/classcv_1_1BOWTrainer.html" shape="rect" title="Abstract base class for training the bag of visual words vocabulary from a set of descriptors..."/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2b6df61c3df97122eb50c417455b5bac"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a2b6df61c3df97122eb50c417455b5bac">BOWKMeansTrainer</a> (int <a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#aec28a6dd06354f4b13462434e1f39e03">clusterCount</a>, const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> &amp;<a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a6858ee26d31e8537ce6a8ae33d883d4c">termcrit</a>=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(), int <a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a38cc72f20413df1fd2de0f2e10ef9af2">attempts</a>=3, int <a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#aa0a8079aa21df8ab4d8fd7769eedf79a">flags</a>=<a class="el" href="../../d5/d38/group__core__cluster.html#gga276000efe55ee2756e0c471c7b270949a78ddd00a99cd51db10ed63c024eb1e62">KMEANS_PP_CENTERS</a>)</td></tr>
<tr class="memdesc:a2b6df61c3df97122eb50c417455b5bac"><td class="mdescLeft"> </td><td class="mdescRight">The constructor.  <a href="#a2b6df61c3df97122eb50c417455b5bac">More...</a><br/></td></tr>
<tr class="separator:a2b6df61c3df97122eb50c417455b5bac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a83962b4626649d55136fd98a087bf013"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a83962b4626649d55136fd98a087bf013">~BOWKMeansTrainer</a> ()</td></tr>
<tr class="separator:a83962b4626649d55136fd98a087bf013"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a489bdcbdbc8f1d470683e3c375b1a4df"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a489bdcbdbc8f1d470683e3c375b1a4df">cluster</a> () const <a class="el" href="../../db/de0/group__core__utils.html#ga4d89d63e402ef9ddc48e18e21180fe4a">CV_OVERRIDE</a></td></tr>
<tr class="separator:a489bdcbdbc8f1d470683e3c375b1a4df"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0ac921f4781724dbd4b2ce06e34c304f"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a0ac921f4781724dbd4b2ce06e34c304f">cluster</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;<a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a2a447f969feed258bd3cdfc521bc9502">descriptors</a>) const <a class="el" href="../../db/de0/group__core__utils.html#ga4d89d63e402ef9ddc48e18e21180fe4a">CV_OVERRIDE</a></td></tr>
<tr class="memdesc:a0ac921f4781724dbd4b2ce06e34c304f"><td class="mdescLeft"> </td><td class="mdescRight">Clusters train descriptors.  <a href="#a0ac921f4781724dbd4b2ce06e34c304f">More...</a><br/></td></tr>
<tr class="separator:a0ac921f4781724dbd4b2ce06e34c304f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1BOWTrainer"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1BOWTrainer')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html">cv::BOWTrainer</a></td></tr>
<tr class="memitem:af02c83dd5e72f5b3b7b78af818b4c80d inherit pub_methods_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#af02c83dd5e72f5b3b7b78af818b4c80d">BOWTrainer</a> ()</td></tr>
<tr class="separator:af02c83dd5e72f5b3b7b78af818b4c80d inherit pub_methods_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ea0d25f629cad8ffa38fac6048adab5 inherit pub_methods_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a8ea0d25f629cad8ffa38fac6048adab5">~BOWTrainer</a> ()</td></tr>
<tr class="separator:a8ea0d25f629cad8ffa38fac6048adab5 inherit pub_methods_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84a70df7f06e7339408f36eb040914ea inherit pub_methods_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a84a70df7f06e7339408f36eb040914ea">add</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;<a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a2a447f969feed258bd3cdfc521bc9502">descriptors</a>)</td></tr>
<tr class="memdesc:a84a70df7f06e7339408f36eb040914ea inherit pub_methods_classcv_1_1BOWTrainer"><td class="mdescLeft"> </td><td class="mdescRight">Adds descriptors to a training set.  <a href="../../d5/d14/classcv_1_1BOWTrainer.html#a84a70df7f06e7339408f36eb040914ea">More...</a><br/></td></tr>
<tr class="separator:a84a70df7f06e7339408f36eb040914ea inherit pub_methods_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a54968befe8957d2691fc8e492aeea72c inherit pub_methods_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a54968befe8957d2691fc8e492aeea72c">clear</a> ()</td></tr>
<tr class="separator:a54968befe8957d2691fc8e492aeea72c inherit pub_methods_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3336e4c738c273482d1bf2cc2b6b5829 inherit pub_methods_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a3336e4c738c273482d1bf2cc2b6b5829">descriptorsCount</a> () const</td></tr>
<tr class="memdesc:a3336e4c738c273482d1bf2cc2b6b5829 inherit pub_methods_classcv_1_1BOWTrainer"><td class="mdescLeft"> </td><td class="mdescRight">Returns the count of all descriptors stored in the training set.  <a href="../../d5/d14/classcv_1_1BOWTrainer.html#a3336e4c738c273482d1bf2cc2b6b5829">More...</a><br/></td></tr>
<tr class="separator:a3336e4c738c273482d1bf2cc2b6b5829 inherit pub_methods_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade701ea5056380d950a4dfd1c3f7f3fa inherit pub_methods_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">const std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#ade701ea5056380d950a4dfd1c3f7f3fa">getDescriptors</a> () const</td></tr>
<tr class="memdesc:ade701ea5056380d950a4dfd1c3f7f3fa inherit pub_methods_classcv_1_1BOWTrainer"><td class="mdescLeft"> </td><td class="mdescRight">Returns a training set of descriptors.  <a href="../../d5/d14/classcv_1_1BOWTrainer.html#ade701ea5056380d950a4dfd1c3f7f3fa">More...</a><br/></td></tr>
<tr class="separator:ade701ea5056380d950a4dfd1c3f7f3fa inherit pub_methods_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a38cc72f20413df1fd2de0f2e10ef9af2"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a38cc72f20413df1fd2de0f2e10ef9af2">attempts</a></td></tr>
<tr class="separator:a38cc72f20413df1fd2de0f2e10ef9af2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec28a6dd06354f4b13462434e1f39e03"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#aec28a6dd06354f4b13462434e1f39e03">clusterCount</a></td></tr>
<tr class="separator:aec28a6dd06354f4b13462434e1f39e03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa0a8079aa21df8ab4d8fd7769eedf79a"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#aa0a8079aa21df8ab4d8fd7769eedf79a">flags</a></td></tr>
<tr class="separator:aa0a8079aa21df8ab4d8fd7769eedf79a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6858ee26d31e8537ce6a8ae33d883d4c"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d72/classcv_1_1BOWKMeansTrainer.html#a6858ee26d31e8537ce6a8ae33d883d4c">termcrit</a></td></tr>
<tr class="separator:a6858ee26d31e8537ce6a8ae33d883d4c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_attribs_classcv_1_1BOWTrainer"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classcv_1_1BOWTrainer')"><img alt="-" src="../../closed.png"/> Protected Attributes inherited from <a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html">cv::BOWTrainer</a></td></tr>
<tr class="memitem:a2a447f969feed258bd3cdfc521bc9502 inherit pro_attribs_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a2a447f969feed258bd3cdfc521bc9502">descriptors</a></td></tr>
<tr class="separator:a2a447f969feed258bd3cdfc521bc9502 inherit pro_attribs_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0aa1b9d10cb5790c13977c7ef3d60589 inherit pro_attribs_classcv_1_1BOWTrainer"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#a0aa1b9d10cb5790c13977c7ef3d60589">size</a></td></tr>
<tr class="separator:a0aa1b9d10cb5790c13977c7ef3d60589 inherit pro_attribs_classcv_1_1BOWTrainer"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>kmeans -based class to train visual vocabulary using the <em>bag of visual words</em> approach. : </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2b6df61c3df97122eb50c417455b5bac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b6df61c3df97122eb50c417455b5bac">◆ </a></span>BOWKMeansTrainer()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::BOWKMeansTrainer::BOWKMeansTrainer </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>clusterCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> &amp; </td>
          <td class="paramname"><em>termcrit</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>attempts</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../d5/d38/group__core__cluster.html#gga276000efe55ee2756e0c471c7b270949a78ddd00a99cd51db10ed63c024eb1e62">KMEANS_PP_CENTERS</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;BOWKMeansTrainer object&gt;</td><td>=</td><td>cv.BOWKMeansTrainer(</td><td class="paramname">clusterCount[, termcrit[, attempts[, flags]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>The constructor. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d5/d38/group__core__cluster.html#ga9a34dc06c6ec9460e90860f15bcd2f88" title="Finds centers of clusters and groups input samples around the clusters. ">cv::kmeans</a> </dd></dl>
</div>
</div>
<a id="a83962b4626649d55136fd98a087bf013"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83962b4626649d55136fd98a087bf013">◆ </a></span>~BOWKMeansTrainer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual cv::BOWKMeansTrainer::~BOWKMeansTrainer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a489bdcbdbc8f1d470683e3c375b1a4df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a489bdcbdbc8f1d470683e3c375b1a4df">◆ </a></span>cluster() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::BOWKMeansTrainer::cluster </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWKMeansTrainer.cluster(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWKMeansTrainer.cluster(</td><td class="paramname">descriptors</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
<p>Implements <a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#abbd3b3cb63690fa7128db1a1fcb84eab">cv::BOWTrainer</a>.</p>
</div>
</div>
<a id="a0ac921f4781724dbd4b2ce06e34c304f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ac921f4781724dbd4b2ce06e34c304f">◆ </a></span>cluster() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::BOWKMeansTrainer::cluster </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>descriptors</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWKMeansTrainer.cluster(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWKMeansTrainer.cluster(</td><td class="paramname">descriptors</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Clusters train descriptors. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">descriptors</td><td>Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.</td></tr>
  </table>
  </dd>
</dl>
<p>The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered. </p>
<p>Implements <a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html#ab869df2d888741c37e33c06eee8d54dc">cv::BOWTrainer</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a38cc72f20413df1fd2de0f2e10ef9af2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38cc72f20413df1fd2de0f2e10ef9af2">◆ </a></span>attempts</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int cv::BOWKMeansTrainer::attempts</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aec28a6dd06354f4b13462434e1f39e03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec28a6dd06354f4b13462434e1f39e03">◆ </a></span>clusterCount</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int cv::BOWKMeansTrainer::clusterCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aa0a8079aa21df8ab4d8fd7769eedf79a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0a8079aa21df8ab4d8fd7769eedf79a">◆ </a></span>flags</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int cv::BOWKMeansTrainer::flags</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a6858ee26d31e8537ce6a8ae33d883d4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6858ee26d31e8537ce6a8ae33d883d4c">◆ </a></span>termcrit</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> cv::BOWKMeansTrainer::termcrit</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../d5/d0d/features2d_8hpp.html">features2d.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:42 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
